@extends('layouts.app')

@section('content')

<div class="container">
    <div class="col-md-10 col-md-offset-1">
        <div class="panel panel-default">
            
            <div class="panel-heading">
                <h1>
                    <i class="glyphicon glyphicon-edit"></i> Prize /
                    @if($prize->id)
                        Edit #{{$prize->id}}
                    @else
                        Create
                    @endif
                </h1>
            </div>

            @include('common.error')

            <div class="panel-body">
                @if($prize->id)
                    <form action="{{ route('prizes.update', $prize->id) }}" method="POST" accept-charset="UTF-8">
                        <input type="hidden" name="_method" value="PUT">
                @else
                    <form action="{{ route('prizes.store') }}" method="POST" accept-charset="UTF-8">
                @endif

                    <input type="hidden" name="_token" value="{{ csrf_token() }}">

                    
                <div class="form-group">
                    <label for="
product_id-field">
Product_id</label>
                    <input class="form-control" type="text" name="
product_id" id="
product_id-field" value="{{ old('
product_id', $prize->
product_id ) }}" />
                </div> 
                <div class="form-group">
                    <label for="status-field">Status</label>
                    <input class="form-control" type="text" name="status" id="status-field" value="{{ old('status', $prize->status ) }}" />
                </div> 
                <div class="form-group">
                    <label for="quantity-field">Quantity</label>
                    <input class="form-control" type="text" name="quantity" id="quantity-field" value="{{ old('quantity', $prize->quantity ) }}" />
                </div> 
                <div class="form-group">
                    <label for="remain_quantity-field">Remain_quantity</label>
                    <input class="form-control" type="text" name="remain_quantity" id="remain_quantity-field" value="{{ old('remain_quantity', $prize->remain_quantity ) }}" />
                </div> 
                <div class="form-group">
                    <label for="redeeming_quantity-field">Redeeming_quantity</label>
                    <input class="form-control" type="text" name="redeeming_quantity" id="redeeming_quantity-field" value="{{ old('redeeming_quantity', $prize->redeeming_quantity ) }}" />
                </div> 
                <div class="form-group">
                    <label for="redeemed_quantity-field">Redeemed_quantity</label>
                    <input class="form-control" type="text" name="redeemed_quantity" id="redeemed_quantity-field" value="{{ old('redeemed_quantity', $prize->redeemed_quantity ) }}" />
                </div> 
                <div class="form-group">
                    <label for="user_redeeming_quantity-field">User_redeeming_quantity</label>
                    <input class="form-control" type="text" name="user_redeeming_quantity" id="user_redeeming_quantity-field" value="{{ old('user_redeeming_quantity', $prize->user_redeeming_quantity ) }}" />
                </div> 
                <div class="form-group">
                    <label for="accumulate_point-field">Accumulate_point</label>
                    <input class="form-control" type="text" name="accumulate_point" id="accumulate_point-field" value="{{ old('accumulate_point', $prize->accumulate_point ) }}" />
                </div> 
                <div class="form-group">
                    <label for="shelves_begin-field">Shelves_begin</label>
                    <input class="form-control" type="text" name="shelves_begin" id="shelves_begin-field" value="{{ old('shelves_begin', $prize->shelves_begin ) }}" />
                </div> 
                <div class="form-group">
                    <label for="shelves_end-field">Shelves_end</label>
                    <input class="form-control" type="text" name="shelves_end" id="shelves_end-field" value="{{ old('shelves_end', $prize->shelves_end ) }}" />
                </div> 
                <div class="form-group">
                    <label for="redeeming_begin-field">Redeeming_begin</label>
                    <input class="form-control" type="text" name="redeeming_begin" id="redeeming_begin-field" value="{{ old('redeeming_begin', $prize->redeeming_begin ) }}" />
                </div> 
                <div class="form-group">
                    <label for="redeeming_end-field">Redeeming_end</label>
                    <input class="form-control" type="text" name="redeeming_end" id="redeeming_end-field" value="{{ old('redeeming_end', $prize->redeeming_end ) }}" />
                </div> 
                <div class="form-group">
                    <label for="redeemed_begin-field">Redeemed_begin</label>
                    <input class="form-control" type="text" name="redeemed_begin" id="redeemed_begin-field" value="{{ old('redeemed_begin', $prize->redeemed_begin ) }}" />
                </div> 
                <div class="form-group">
                    <label for="redeemed_end-field">Redeemed_end</label>
                    <input class="form-control" type="text" name="redeemed_end" id="redeemed_end-field" value="{{ old('redeemed_end', $prize->redeemed_end ) }}" />
                </div> 
                <div class="form-group">
                    <label for="order_num-field">Order_num</label>
                    <input class="form-control" type="text" name="order_num" id="order_num-field" value="{{ old('order_num', $prize->order_num ) }}" />
                </div> 
                <div class="form-group">
                    <label for="delflag-field">Delflag</label>
                    <input class="form-control" type="text" name="delflag" id="delflag-field" value="{{ old('delflag', $prize->delflag ) }}" />
                </div>

                    <div class="well well-sm">
                        <button type="submit" class="btn btn-primary">Save</button>
                        <a class="btn btn-link pull-right" href="{{ route('prizes.index') }}"><i class="glyphicon glyphicon-backward"></i>  Back</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

@endsection